(ns pe.p20
  (:use pe.digits))

(defn fact [n]
  (loop [acc n res 1]
    (cond
      (= 1 acc) res
      :else (recur (dec acc) (* res acc)))))

(println (fact 100))
(println (reduce + (digits (fact 100))))